﻿<html DIR="LTR" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
  <head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" />
    <META NAME="save" CONTENT="history" />
    <title>Readme_Creating a Simple ETL Package Tutorial: Lesson Packages</title>
    
    
    
    <style TYPE="text/css">
body
{
background: #FFFFFF;
color: #000000;
font-family:    Verdana;
font-size: medium;
font-style: normal;
font-weight: normal;
margin-top: 0;
margin-bottom:  0;
margin-left:    0;
margin-right:   0;
width:  100%;
}

div.#mainSection
{
font-size: 70%;
width: 100%;
padding-left:    10;
margin-right: 10;
}

div.#mainBody
{
font-size: 90%;
margin-top: 10;
padding-bottom: 20;
}

div.#header
{
background-color: #D2D2D2;
padding-top:    0;
padding-bottom: 0;
padding-left:   10;
padding-right:  0;
width:          100%;
}

div.#header table
{
border-bottom-color: #C8CDDE;
border-bottom-style: solid;
border-bottom-width: 1;
width:  100%;
}

span.#runningHeaderText
{
color: #003399;
font-size: 90%;
}

span.#nsrTitle
{
/*    color: #003399;*/
font-size: 120%;
font-weight: 600;
}

div.#header table td
{
color: #000000;
font-size: 70%;
margin-top: 0;
margin-bottom:  0;
padding-right: 20;
}

div.#header table tr.#headerTableRow3 td
{
padding-bottom: 2;
padding-top: 5;
}

div.#header table.#bottomTable
{
border-top-color: #FFFFFF;
border-top-style: solid;
border-top-width: 1;
text-align: left;
}

div.#footer
{
font-size: 90%;
margin-top: 0;
margin-bottom:  0;
margin-left:    -5;
margin-right:   0;
padding-top:    2;
padding-bottom: 2;
padding-left:   0;
padding-right:  0;
width:  100%;
}

hr.#footerHR
{
border-bottom-color: #EEEEFF;
border-bottom-style: solid;
border-bottom-width: 1;
border-top-color: C8CDDE;
border-top-style: solid;
border-top-width: 1;
height: 3;
color: #D2D2D2;
}

div.section
{
padding-top:    2;
padding-bottom: 2;
padding-right:  15;
width:  100%;
}

.heading
{
color:          #000000;
font-weight:    bold;
margin-top:     18;
margin-bottom:  8;
}

h1.heading
{
color: #000000;
font-size:  150%;
}

.subHeading
{
color:          #000000;
font-weight:    bold;
font-size:      150%;
margin-bottom:  4;
}

h2.subHeading
{
color:          #000000;
font-weight:    bold;
font-size:      130%;
}
h3.subHeading
{
color:  #000000;
font-size: 125%;
font-weight: bold;
}

h4.subHeading
{
color: #000000;
font-size: 110%;
font-weight: bold;
}

h4.procedureHeading
{
color: #000080;
font-size: 110%;
font-weight: bold;
}

h5.subHeading
{
color: #000000;
font-size: 100%;
font-weight: bold;
}

img
{
padding-bottom: 10;
}

img.toggle
{
border: 0;
margin-right: 5;
padding-bottom: 10;
}

img.copyCodeImage
{
border: 0;
margin: 1;
margin-right: 3;
padding-bottom: 10;
}

img.downloadCodeImage
{
border: 0;
margin-right: 3;
padding-bottom: 10;
}

img.viewCodeImage
{
border: 0;
margin-right: 3;
padding-bottom: 10;
}

img.note
{
border: 0;
margin-right: 3;
padding-bottom: 10;
}

img.#membersOptionsFilterImage
{
border: 0;
margin-left: 10;
vertical-align: middle;
padding-bottom: 10;
}

img.#toggleAllImage
{
margin-left: 4;
vertical-align: middle;
padding-bottom: 10;
}

div.#mainSection table
{
border: 0;
font-size: 100%;
width:  100%;
margin-top: 5px;
margin-bottom: 15px;
}

div.#mainSection table tr
{
vertical-align: top;
}

div.#mainSection table th
{
text-align: left;
background: #D8D8D8;
border-bottom-color: #D8D8D8;
border-bottom-style: solid;
border-bottom-width: 1;
color: #000000;
padding-left: 5;
padding-right: 5;
}

div.#mainSection table td
{
background: #F2F2F2;
border-top-color: #D8D8D8;
border-top-style: solid;
border-top-width: 1;
padding-left: 5;
padding-right: 5;
}

div.#mainSection table td.imageCell
{
white-space: nowrap;
}

div.code
{
width: 98%;
}

div.code table
{
border: 0;
font-size: 95%;
margin-bottom: 5;
width: 100%
}

div.code table th
{
text-align: left;
background: #D8D8D8;
border-bottom-color: #D8D8D8;
border-bottom-style: solid;
border-bottom-width: 1;
color: #000000;
font-weight: bold;
padding-left: 5;
padding-right: 5;
}

div.code table td
{
background: #CCCCCC;
border-top-color: #D8D8D8;
border-top-style: solid;
border-top-width: 1;
padding-left: 5;
padding-right: 5;
padding-top: 5;
}

div.alert
{
margin-left: 10;
width: 98%;
}

div.alert table
{
border: 1;
font-size: 100%;
width:  100%;
border: solid 1 #DEDFEF;
}

div.alert table th
{
text-align: left;
background: #D8D8D8;
border-bottom-width: 0;
color: #000000;
padding-left: 5;
padding-right: 5;
border: solid 1 #DEDFEF;
}

div.alert table td
{
background: #FFFFFF;
border-top-color: #D8D8D8;
border-top-style: solid;
border-top-width: 1;
padding-left: 5;
padding-right: 5;
border: solid 1 #DEDFEF;
}

span.copyCode
{
color: #0000ff;
font-size: 90%;
font-weight: normal;
cursor: hand;
float: right;
display: inline;
text-align: right;
}

.downloadCode
{
color: #0000ff;
font-size: 90%;
font-weight: normal;
cursor: hand;
}

.viewCode
{
color: #0000ff;
font-size: 90%;
font-weight: normal;
cursor: hand;
}

div.code pre
{
font-family:    Monospace, Courier New, Courier;
font-size: 105%;
color:  #000000;
}

code
{
font-family:    Monospace, Courier New, Courier;
font-size: 105%;
color:  #000000;
}

dl
{
margin-top: 0;
padding-left:   1;
}

dd
{
margin-bottom:  0;
margin-left:    0;
padding-left:   20;
}

dd p
{
margin-top: 5;
}

ul
{
margin-left: 17;
list-style-type: disc;
}

ul ul
{
margin-bottom: 4;
margin-left: 17;
margin-top: 3;
list-style-type: disc;
}

ol
{
margin-left: 24;
list-style-type: decimal;
}

ol ol
{
margin-left: 24;
margin-top: 3;
list-style-type: lower-alpha;
}

li
{
margin-top: 0;
margin-bottom: 0;
padding-bottom: 0;
padding-top: 0;
margin-left: 5;
}

p
{
margin-bottom: 15;
}

.tip
{
color:  #0000FF;
font-style: italic;
cursor:hand;
text-decoration:underline;
}

.math
{
font-family: Times New Roman;
font-size: 125%
}
.sourceCodeList
{
font-family: Verdana;
font-size: 90%;
}

pre.viewCode
{
width: 100%;
overflow: auto;
}

li:hover table, li.over table
{
background-color: #C0C0C0;
}

li:hover ul, li.over ul
{
background-color: #d2d2d2;
border: 1px solid #000;
display: block;
}
            </style>
  </head>
  <body>
    <!--Topic built:08/05/2008 01:28:33-->

    
    
    
    
    
    
    
    
    
    <div id="header">
      <table width="100%" id="topTable"><tr>
          <td align="left">
            <span id="nsrTitle">Readme_Creating a Simple ETL Package Tutorial: Lesson Packages</span>
          </td>
          <td align="right">
            <span id="headfb" class="feedbackhead">
            </span>
          </td>
        </tr></table>
      
      
      
    </div>
    <div id="mainSection">
      <div id="mainBody"><p> 08/05/2008 01:28:33</p>
        
        <font color="DarkGray"> </font><p /> 
        <span id="changeHistory">
        </span>
    <p>
      This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.
    </p>
    <p>This sample works with the SQL Server 2005 version of the <b>AdventureWorks DW</b> database. To install this database, see <a href="http://go.microsoft.com/fwlink/?LinkId=122077" alt="blocked::http://go.microsoft.com/fwlink/?LinkId=122077"><linkText xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">Sample Databases for Microsoft SQL Server 2008</linkText></a>. </p>
    <p>The Lesson 1, Lesson2, Lesson 3, Lesson 4, and Lesson 5 packages are the completed packages from the Integration Services tutorial, <b>Tutorial: Creating a Simple ETL Package</b>. The topics in Books Online provide detailed information about the functionality of each package. For more information, see the topics in "Creating a Simple ETL Package Tutorial" located in the Integration Services Tutorials section of Books Online. Each lesson's package builds on the version of the package created in the earlier lessons.</p>
    <p>You can open and run these packages outside the tutorial. However, we do not recommend that you modify them. Modification of tutorial packages may give you results that differ from those defined in the tutorial lessons. </p>
    <p>The following table provides a brief summary of each package.</p>
    <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;"><tr>
          <th>
            Lessons
          </th>
          <th>
            Description
          </th>
        </tr><tr>
        <td>
          <p>Lesson 1</p>
        </td>
        <td>
          <p>A simple ETL package that extracts data from a single flat file, transforms the data by using lookup transformations, and finally loads the result into a fact table. </p>
        </td>
      </tr><tr>
        <td>
          <p>Lesson 2</p>
        </td>
        <td>
          <p>In this lesson, you will expand the package you created in Lesson 1 to take advantage of new looping features to extract multiple flat files into a single data flow process.</p>
        </td>
      </tr><tr>
        <td>
          <p>Lesson 3</p>
        </td>
        <td>
          <p>In this lesson, you will expand the package you created in Lesson 2 to use a package configuration, variable, and property expression to dynamically update a property.</p>
        </td>
      </tr><tr>
        <td>
          <p>Lesson 4</p>
        </td>
        <td>
          <p>In this lesson, you will expand the package you created in Lesson 3 to add logging.</p>
        </td>
      </tr><tr>
        <td>
          <p>Lesson 5</p>
        </td>
        <td>
          <p>In this lesson, you will expand the package you created in lesson 4 to use error redirection to capture invalid data in a text file. </p>
        </td>
      </tr></table>
    <div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Important: </th></tr><tr><td>
      Samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples.<p />
    </td></tr></table><p /></div>
  <h1 class="heading">Requirements</h1><div id="requirementsSection" class="section">
    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">Running this sample package requires the following:</p>
      <ul xmlns=""><li>
          The sample packages and data files that it uses must be installed on the local hard disk drive. <br />
        </li><li>
          You must have installed and have administrative permissions on the <b>AdventureWorks DW</b> database. <br />
        </li><li>
          If you intend only to run the sample package from the command line, you must install Integration Services. <br />
        </li><li>
          If you intend to open the package in SSIS Designer and run the sample package, you must also install Business Intelligence Development Studio. <br />
        </li></ul>
      <p xmlns="">For more information about how to install samples, see "Installing Sample Integration Services Packages" in SQL Server Books Online. </p>
    </content>
  </div><h1 class="heading">Location of the Sample Packages</h1><div id="sectionSection0" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">If the samples were installed to the default installation location, the tutorial sample packages are located in the following folder: </p>
      <p xmlns="">
        C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Tutorial\Creating a Simple ETL Package\Completed Packages</p>
    </content></div><h1 class="heading">Running the Sample</h1><div id="sectionSection1" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">The packages can be run from the command line by using the <b>dtexec</b> utility, or can be run in Business Intelligence Development Studio.</p>
      <p xmlns="">The Lesson 5 package uses the package configuration file that is created in lesson 3 and used by the Lesson 3 and Lesson 4 packages. Before you run the Lesson 5 package, make sure that the ConfiguredValue element in the SSISTutorial.dtsConfig file contains the location of the Sample Data folder. The default location of this folder is C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Tutorial\Creating a Simple ETL Package\Sample Data.</p>
      <p xmlns="">Also, the Lesson 5 package uses the Currency_BAD.txt file. If you want to use the file provided instead of creating the file, you must copy Currency_BAD.txt from C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Tutorial\Creating a Simple ETL Package\Completed Packages to C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Tutorial\Creating a Simple ETL Package\Sample Data before you run the package.</p>
      <p xmlns="">If you are using a non-English version of Windows, you may have to update the <b>ConnectionString</b> property of any file connection managers used in the package to run the sample package successfully. You should verify that the path used in the connection manager is valid on your computer and, if necessary, modify the path so that it uses the localized name of the Program Files folder.</p>
      <p xmlns="">For this sample, you may have to update "Program Files" in the <b>ConnectionString</b> property for the Sample Data connection manager.</p>
      <h4 class="procedureHeading" xmlns="">To run the package by using dtexec</h4><div id="procedureSectionEDDDBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Open a Command Prompt window.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Change the directory to C:\Program Files\Microsoft SQL Server\100\DTS\Binn, the location of <b>dtexec</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Type the following command:</p>
              <div class="code" xmlns=""><span codeLanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left" /></tr><tr><td colspan="2"><pre>dtexec /f "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Tutorial\Creating a Simple ETL Package\Completed Packages\&lt;package name&gt;"</pre></td></tr></table></span></div>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Press <b>Enter</b>.</p>
            </content>
          </li></ol></div>
      <p xmlns="">For more information about how to run the package by using the <b>dtexec</b> utility, see the topic, "dtexec Utility", in SQL Server Books Online. </p>
    </content><sections xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <h3 class="subHeading" xmlns="">Running the Sample in Business Intelligence Development Studio</h3><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">If you do not already have an Integration Services project to which you can add the tutorial packages, you must first create a project.</p>
          <h4 class="procedureHeading" xmlns="">To create a new Integration Services project</h4><div id="procedureSectionEFBBBDBHA" class="section" xmlns=""><ol><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">Open Business Intelligence Development Studio.</p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">On the <b>File</b> menu, point to <b>New</b>, and then click <b>Project</b>. </p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">In the <b>New Project</b> dialog box, select the <b>Integration Services Project</b> template from the <b>Templates</b> pane. </p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">Optionally, edit the project name and the location. The solution name is automatically updated to match the project name.</p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">In the <b>Solution</b> drop-down list, select <b>Create new Solution</b>.</p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">To create a separate folder for the solution file, select <b>Create directory for solution</b>. This is the default option.</p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">Click <b>OK</b> to add the solution to <b>Solution Explore</b>r and add the project to the solution.</p>
                </content>
              </li></ol></div>
          <p xmlns="">Next, you must add the packages to the Integration Services project.</p>
          <h4 class="procedureHeading" xmlns="">To run a package in Business Intelligence Development Studio</h4><div id="procedureSectionEBBBBDBHA" class="section" xmlns=""><ol><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">In Solution Explorer, right-click <b>SSIS Packages</b> and then click <b>Add Existing Package</b>.</p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">In the <b>Add Copy of Existing Package</b> dialog box, set <b>Package location</b> to <b>File system</b>, click browse <b>(…)</b>, and locate the folder that contains the completed packages from the tutorial. The default location is C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Tutorial\Creating a Simple ETL Package\Completed Packages.</p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">Click the package to add, and then click <b>Open</b>.</p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">Click <b>OK</b>.</p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">Repeat steps 1-4 to add tutorial packages to the project. </p>
                </content>
              </li><li>
                <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  <p xmlns="">Right-click the package to run in the <b>SSIS Packages</b> folder, and then click <b>Execute Package</b>. </p>
                </content>
              </li></ol></div>
        </content></div>
    </sections></div><!--[if gte IE 5]>
			<tool:tip element="seeAlsoToolTip" avoidmouse="false"/><tool:tip element="languageFilterToolTip" avoidmouse="false"/><tool:tip element="roleInfoSpan" avoidmouse="false"/>
		<![endif]--></div>
      <div id="footer">
			
			© 2008 Microsoft Corporation. All rights reserved.
		</div>
    </div>
  </body>
</html>